import Vue from 'vue'
import Router from 'vue-router'
 
//登录
const Login = resolve => require(['@/page/views/login.vue'], resolve)
//
const mixBase = resolve => require(['@/page/views/mixBase.vue'], resolve)

const courseList = resolve =>
  require(['@/page/course/courseList.vue'], resolve) //课程列表
const courseSection = resolve =>
  require(['@/page/course/courseSection.vue'], resolve) //课程订阅列表 
 
Vue.use(Router)
export default new Router({
  routes: [
    { path: '*', redirect: '/courseList' },  
    { path: '/Login', name: 'Login', component: Login, meta: { title: '登录' } },
    {
        path: '/mixBase',
        component: mixBase,
        children: [ 
            { path: '/courseList', name: 'courseList', component: courseList, meta: { title: '课程列表' } },
            { path: '/courseSection', name: 'courseSection', component: courseSection, meta: { title: '课程订阅列表' } },  
        ]
    },  
  ]
})
